﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using Newtonsoft.Json;
using System.Text;

using CRMFramework;
using CRMEntity;
using CRMBiz;


namespace CRMWeb.WebServices.AM
{
    /// <summary>
    /// Summary description for Summary
    /// </summary>
    public class Summary : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            int LoanID = string.IsNullOrEmpty(context.Request.QueryString["LoanID"]) ? 0 : int.Parse(context.Request.QueryString["LoanID"]);
            DataSet ds = SummaryHandler.GetSummaryList(LoanID);
            var strJson = JsonConvert.SerializeObject(ds.Tables[0]);
            context.Response.Write(strJson);
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}